package main;

import java.io.File;

import javax.swing.SwingWorker;

import fileProcessing.ParsingException;

public class Task extends SwingWorker<Void, Void> {
	
	private File file;
	private float count;
	private Boolean send;
	
	public Task(File file, Boolean send) {
		count = 0;
		this.file = file;
		this.send = send;
	}
	@Override
    public Void doInBackground() {
		try {
			new Main(file,send);
		} catch (ParsingException e) {
			e.printStackTrace();
		}
		return null;
    }
	public void notify(float i) {
		count += i;
		setProgress((int) count);
	}
}
